home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 215 / 215.d81 / slide poker (.txt) < prev    next >
Encoding:
Commodore BASIC  |  2002-01-01  |  8.4 KB  |  289 lines

  1. 10 poke56,56:poke51,0:clr:dv=peek(186):ifdv<8thendv=8
  2. 14 sys36867,"slide scores"
  3. 20 dimi,x,y,su,et,el,ps,lv,lf,pp,mt,s,f,ca,va,t,jj,j%
  4. 30 bd=14:hl=6:sk=14:poke16383,31
  5. 40 gosub300
  6. 50 goto1640
  7. 67 :
  8. 68 :rem getkey
  9. 69 :
  10. 70 gosub210
  11. 80 fori=1tolen(ch$):ifa$=mid$(ch$,i,1)thenreturn
  12. 90 next:goto70
  13. 178 :rem error channel
  14. 179 :
  15. 180 open15,dv,15:input#15,er,er$,a,a:close15
  16. 182 return
  17. 197 :
  18. 198 :rem press key prompt
  19. 199 :
  20. 200 poke214,22:print:print"            press a key          [145][145][145]"
  21. 210 geta$:ifa$=""then250:return
  22. 227 :
  23. 228 :rem print at
  24. 229 :
  25. 230 poke211,x:poke214,y:sys58732:return
  26. 237 :
  27. 238 :rem multitask shuffle
  28. 239 :
  29. 250 ifjj=nc-2thenjj=-1
  30. 260 jj=jj+1:j%=jj+int(rnd(0)*(nc-jj)):temp=s(jj):s(jj)=s(j%):s(j%)=temp:goto210
  31. 277 :
  32. 278 :rem erase card
  33. 279 :
  34. 280 sysmt+3,x,x+3,y,y+4,00,sk:return
  35. 297 :
  36. 298 :rem initialize
  37. 299 :
  38. 300 dimva$(13),vb$(13),st$(4,12),op(15),s(54)
  39. 301 dimb(13,1),dk(54),x(13),y(13),c(13),hd(13),fs(3),fl(7),ph(15,6)
  40. 302 f=54272:fori=ftof+78:pokei,0:next:mt=52224
  41. 304 pokef+1,50:pokef+24,12:pokef+5,128
  42. 310 cr$="[216][203][202][201][200][199][198][197][196]&[195][194][217]":cs$="[204][215][214][213][212][211][210][209][208]'[207][206][205]"
  43. 320 s$(0)="[162]":s$(1)="[173]":s$(2)="[192]":s$(3)="[193]":co$(0)="[144]":co$(1)="":co$(2)=""
  44. 330 co$(3)="[144]":s1$(0)="[161]":s1$(1)="[218]":s1$(2)="[223]":s1$(3)="[176]"
  45. 340 fori=0to12:va$(i)=mid$(cr$,i+1,1):vb$(i)=mid$(cs$,i+1,1):next
  46. 350 bk$="!##$[157][157][157][157]#[190][190]#[157][157][157][157]#[190][190]#[157][157][157][157]#[190][190]#[157][157][157][157]\++*[157][157][157][157][145][145][145][145]"
  47. 352 jk$="!##$[157][157][157][157]#[186][187]#[157][157][157][157]#[188][189]#[157][157][157][157]#[190][191]#[157][157][157][157]\++*[157][157][157][157][145][145][145][145]"
  48. 360 deffns(x)=int(x/13):deffnv(x)=x-13*int(x/13)
  49. 377 :
  50. 378 :rem first shuffle
  51. 379 :
  52. 380 nc=53:jj=-1:fori=0tonc-1:s(i)=i:next
  53. 390 jj=jj+1:j%=jj+int(rnd(0)*(nc-jj)):temp=s(jj):s(jj)=s(j%):s(j%)=temp
  54. 400 ifjj<>nc-2then390
  55. 407 :
  56. 408 :rem define cards
  57. 409 :
  58. 410 st$(0,1)="[215][216][157][157][217][218][146]":st$(0,0)="[211][212][146]":st$(3,0)="[179][180][146]"
  59. 420 st$(0,9)="[193][194][157][157][195][196][157][157][197][198][157][157][199][200][157][157][201][202][146]":st$(3,2)="[183][184][157][157][179][180][157][157][185][186][146]"
  60. 430 st$(0,8)="[193][194][157][157][203][204][157][157][205][206][157][157][207][208][157][157][201][202][146]":st$(0,3)="[193][194][157][157][201][202][146]"
  61. 440 st$(3,8)="[161][162][157][157][171][172][157][157][173][174][157][157][175][176][157][157][169][170][146]":st$(0,7)="[193][194][157][157][211][212][157][157][209][210][157][157][213][214][157][157][201][202][146]"
  62. 450 st$(3,9)="[161][162][157][157][163][164][157][157][165][166][157][157][167][168][157][157][169][170][146]":st$(3,7)="[161][162][157][157][179][180][157][157][177][178][157][157][181][182][157][157][169][170][146]"
  63. 460 st$(3,1)="[183][184][157][157][185][186][146]":st$(0,2)="[215][216][157][157][211][212][157][157][217][218][146]"
  64. 470 st$(0,6)="[193][194][157][157][211][212][157][157][209][210][157][157][201][202][146]":st$(3,6)="[161][162][157][157][179][180][157][157][177][178][157][157][169][170][146]"
  65. 480 st$(3,3)="[161][162][157][157][169][170][146]":st$(0,5)="[193][194][157][157][209][210][157][157][201][202][146]"
  66. 490 st$(3,5)="[161][162][157][157][177][178][157][157][169][170][146]":st$(0,4)="[193][194][157][157][211][212][157][157][201][202][146]"
  67. 500 st$(3,4)="[161][162][157][157][179][180][157][157][169][170][146]":
  68. 510 st$(2,9)="ab[157][157]cd[157][157]ef[157][157]gh[157][157]ij":st$(2,8)="ab[157][157]kl[157][157]mn[157][157]op[157][157]ij"
  69. 520 st$(2,7)="ab[157][157]st[157][157]qr[157][157]uv[157][157]ij":st$(2,6)="ab[157][157]st[157][157]qr[157][157]ij"
  70. 530 st$(2,5)="ab[157][157]qr[157][157]ij":st$(2,4)="ab[157][157]st[157][157]ij":st$(2,3)="ab[157][157]ij"
  71. 540 st$(2,2)="wx[157][157]st[157][157]yz":st$(2,1)="wx[157][157]yz":st$(2,0)="st"
  72. 550 fori=2to3:forj=10to12:st$(i,j)="01[157][157]23[157][157]45[157][157]67[157][157]89":next:next
  73. 560 st$(1,9)="[219][220][157][157][187][188][157][157][223][191][157][157][189][190][157][157][221][255][146]"
  74. 570 st$(1,8)="[219][220][157][157]#$[157][157]%&[157][157]*+[157][157][221][255][146]"
  75. 580 st$(1,6)="[219][220][157][157]\^[157][157]<>[157][157][221][255][146]"
  76. 590 st$(1,5)="[219][220][157][157]<>[157][157][221][255][146]"
  77. 600 st$(1,4)="[219][220][157][157]\^[157][157][221][255][146]"
  78. 610 st$(1,7)="[219][220][157][157]\^[157][157]<>[157][157]_=[157][157][221][255][146]"
  79. 620 st$(1,1)="[166][167][157][157][168][169]":st$(1,2)="[166][167][157][157]\^[146][157][157][146][168][169]"
  80. 630 st$(1,0)="\^[146]":st$(1,3)="[219][220][157][157][221][255][146]"
  81. 640 fori=0to3:st$(i,11)="()[157][157]>?[157][157]45[157][157]<=[157][157]:;":next
  82. 650 st$(0,10)="()[157][157]^_[157][157]45[157][157][][157][157]:;"
  83. 660 st$(1,10)="()[157][157]^_[157][157]45[157][157][][157][157]:;"
  84. 670 st$(1,12)="01[157][157]23[157][157]45[157][157]67[157][157]89"
  85. 680 st$(0,12)="()[157][157]^_[157][157]45[157][157][][157][157]:;"
  86. 690 st$(2,12)="()[157][157]^_[157][157]45[157][157][][157][157]:;"
  87. 700 st$(3,12)="()[157][157]^_[157][157]45[157][157][][157][157]:;"
  88. 717 :
  89. 718 :rem card locations
  90. 719 :
  91. 730 fori=1to4:y(i)=2:x(i)=8*i-2:next:fori=10to13:y(i)=16:x(i)=8*i-74:next
  92. 740 fori=5to9:y(i)=9:x(i)=8*i-38:next:x(0)=1:y(0)=15
  93. 747 :
  94. 748 :rem slide numbers
  95. 749 :
  96. 750 forj=1to14:fori=1to3:readph(j,i):next:next
  97. 752 data1,6,11,2,7,12
  98. 760 data2,6,10,3,8,13
  99. 770 data3,7,11,4,8,12,0,0,0,0,0,0
  100. 780 data10,6,2,11,7,3
  101. 790 data11,6,1,12,8,4
  102. 800 data12,7,2,13,8,3
  103. 810 fori=1to5:ph(7,i)=i+4:ph(8,i)=10-i:next
  104. 817 :
  105. 818 :rem oops pairs
  106. 819 :
  107. 820 fori=1to14:readop(i):next
  108. 822 data11,13,9,14,10,12,8,7,3,5,1,6,2,4
  109. 830 ms$(0)="five of a kind   120"
  110. 840 ms$(1)="royal flush      100"
  111. 850 ms$(2)="straight flush   80"
  112. 860 ms$(3)="four of a kind   60
  113. 870 ms$(4)[178]"full house       40"
  114. 880 ms$(5)[178]"flush            30"
  115. 890 ms$(6)[178]"straight         20"
  116. 900 ms$(7)[178]"three of a kind  15"
  117. 910 ms$(8)[178]"two pair         10"
  118. 920 ms$(9)[178]"a pair           5"
  119. 930 ms$(10)[178]"bust hand        0"
  120. 940 [142]
  121. 957 :
  122. 958 :[143] print or erase card
  123. 959 :
  124. 960 x[178]x(i):y[178]y(i):[141]230
  125. 970 ca[178]b(i,c(i))
  126. 980 su[178][165]s(ca):va[178][165]v(ca)
  127. 990 [151]f[170]4,129:[129]t[178]1[164]15:[130]:[151]f[170]4,128:[151]f[170]5,0
  128. 1010 [139]su[178]4[167]1070
  129. 1020 [139]c(i)[179][177]0[167]1050
  130. 1040 [141]280:[142]:[143] erase card
  131. 1050 [153]co$(su);va$(va);"<<>cmdcmdcmdcmd";s$(su);"  ^cmdcmdcmdcmdtab(  ^cmdcmdcmdcmdtab(  ";s1$(su);
  132. 1060 [153]"cmdcmdcmdcmdsgn==";vb$(va);"ononononcmdcmdcmd";st$(su,va);:[142]
  133. 1070 [153]jk$:[142]
  134. 1080 :
  135. 1088 :[143] move em out
  136. 1089 :
  137. 1090 [129]m[178]1[164]np:tp(m)[178]b(ph(z,m),1):[130]:nr[178]nr[170]1
  138. 1100 [129]m[178]1[164]np[171]1:b(ph(z,m[170]1),1)[178]tp(m):[130]:b(ph(z,1),1)[178]tp(np)
  139. 1110 i[178]ph(z,1):c(i)[178]0:[141]960:[129]m[178]2[164]np:i[178]ph(z,m)
  140. 1120 c(i)[178]0:[141]960:[143] pick it up
  141. 1130 c(i)[178]1:[141]960:[130]:[143] place it
  142. 1140 i[178]ph(z,1):c(i)[178]1:[141]960:[142]
  143. 1150 :
  144. 1158 :[143] score hand
  145. 1159 :
  146. 1160 [129]i[178]0[164]12:hd(i)[178]0:[130]:[129]i[178]0[164]3:fs(i)[178]0:[130]:[129]i[178]1[164]7:fl(i)[178]0:[130]:wc[178]0
  147. 1170 [129]i[178]5[164]9:[139]b(i,1)[177]51[167]wc[178]1:[137]1190
  148. 1180 fc[178]b(i,1):hd([165]v(fc))[178]hd([165]v(fc))[170]1:fs([165]s(fc))[178]fs([165]s(fc))[170]1
  149. 1190 [130]
  150. 1200 [129]i[178]0[164]3:[139]fs(i)[170]wc[178]5[167]fl(1)[178]1
  151. 1210 [130]
  152. 1220 m[178]0: [129]i[178]0[164]8:[139]hd(i)[177]0[167]1250
  153. 1230 m[178]i[170]1
  154. 1240 [130]
  155. 1250 zc[178]0:[129]i[178]m[164]m[170]4:[139]hd(i)[178]0[167]1270
  156. 1260 zc[178]zc[170]1
  157. 1270 [130]:[139]zc[170]wc[178]5[167]fl(6)[178]1
  158. 1280 rk[178]0:[139]hd(0)[178]1[167]rk[178]1
  159. 1290 [129]i[178]9[164]12:[139]hd(i)[179][177]1[167]1310
  160. 1300 rk[178]rk[170]1
  161. 1310 [130]
  162. 1320 [139]rk[170]wc[178]5[167]fl(6)[178]2
  163. 1330 [129]i[178]0[164]12:[139]hd(i)[178]2[167]fl(2)[178]fl(2)[170]1
  164. 1340 [139]hd(i)[178]3[167]fl(3[170]wc)[178]1
  165. 1350 [139]hd(i)[178]4[167]fl(4[170]wc)[178]1
  166. 1360 [130]
  167. 1370 [139]fl(2)[178]1[175]fl(3)[178]0[175]wc[178]0 [167]sc[178]5:  ms[178]9:[137]1510
  168. 1380 [139]fl(2)[178]2[175]wc[178]0[167]sc[178]10:ms[178]8:[137]1510
  169. 1390 [139]fl(2)[178]1[175]wc[178]1[167]sc[178]15:ms[178]7:[137]1510
  170. 1400 [139]fl(2)[178]2[175]wc[178]1[167]sc[178]40:ms[178]4:[137]1510
  171. 1410 [139]fl(2)[178]1[175]fl(3)[178]1[167]sc[178]40:ms[178]4:[137]1510
  172. 1420 [139]fl(3)[178]1[175]fl(2)[178]0[167]sc[178]15:ms[178]7:[137]1510
  173. 1430 [139]fl(1)[178]0[175]fl(6)[177]0[167]sc[178]20:ms[178]6:[137]1510
  174. 1440 [139]fl(1)[178]1[175]fl(6)[178]0[167]sc[178]30:ms[178]5:[137]1510
  175. 1450 [139]fl(4)[178]1[167]sc[178]60: ms[178]3:[137]1510
  176. 1460 [139]fl(1)[178]1[175]fl(6)[178]1[167]sc[178]80:ms[178]2:[137]1510
  177. 1470 [139]fl(1)[178]1[175]fl(6)[178]2[167]sc[178]100:ms[178]1:[137]1510
  178. 1480 [139]fl(5)[178]1[167]sc[178]120:ms[178]0:[137]1510
  179. 1490 [139]wc[178]1[167]sc[178]5:ms[178]9:[137]1510
  180. 1500 sc[178]0:ms[178]10
  181. 1510 [158]mt[170]6,208
  182. 1517 :
  183. 1518 :[143] score card
  184. 1519 :
  185. 1520 [158]mt[170]3,6,33,8,14,160,sk
  186. 1530 [151]646,hl:[151]214,8:[153]:[153][163]10)" "ms$(ms)" "
  187. 1540 [151]646,sk:[153][163]11)"hands to go"[163]27)9[171]hn
  188. 1550 [153][163]11)"slides"[163]27)nr
  189. 1560 [153][163]11)"score of hand"[163]27)sc[171]3[172]nr
  190. 1570 ww[178]ww[170]sc[171]3[172]nr
  191. 1580 [153][163]11)"total score"[163]27)ww
  192. 1590 [139]c(dk)[178]0[167]gg[178]1
  193. 1600 nr[178]0:hn[178]hn[170]1:[141]200:[158]mt[170]9,208:[139]c(dk)[178]0[167][142]
  194. 1610 cs[178]0:[129]i[178]5[164]9:b(i,1)[178]dk(c(dk)):c(dk)[178]c(dk)[171]1:c(i)[178]1:[141]960:[130]
  195. 1620 [139]c(dk)[177]0[167][142]
  196. 1630 i[178]0:[141]960:[142]
  197. 1640 [153]"load":[151]53280,bd:[151]53281,1:[151]53272,31:[151]198,0
  198. 1650 [158]mt[170]3,0,39,0,24,0,sk
  199. 1660 [158]mt[170]6,216
  200. 1667 :
  201. 1668 :[143] game start
  202. 1669 :
  203. 1670 [158]mt[170]9,216
  204. 1680 [129]i[178]1[164]nc:dk(i)[178]s(i[171]1):[130]:c(0)[178]nc:dk[178]0:hn[178]1:gg[178]0:ww[178]0
  205. 1690 [129]i[178]1[164]13:b(i,1)[178]dk(c(dk)):c(dk)[178]c(dk)[171]1:c(i)[178]1:[141]960:[130]
  206. 1700 [151]646,sk:[153]""[163]5)"abcdef"
  207. 1710 [151]214,10:[153]:[153]"g"[163]38)"h"
  208. 1720 [151]214,20:[153]:[153]""[163]5)"ijklmn"
  209. 1730 [153]" ocontops    pcontlay    rcontules    qcontuit "
  210. 1740 ch$[178]"abcdefghijklmnoprq":[141]70
  211. 1742 [139]i[177]0[175]i[179]15[167]op[178]i
  212. 1750 [139]i[179]15[167]1754
  213. 1752 [145]i[171]14[137]1760,1790,1880,1770
  214. 1754 oo[178]0:z[178]i:np[178]3[171]2[172](i[178]7[176]i[178]8):[141]1090:[137]1740
  215. 1757 :
  216. 1758 :[143] oops
  217. 1759 :
  218. 1760 [139]oo[167]1740
  219. 1762 oo[178]1:z[178]op(op):np[178]3[171]2[172](op[178]7[176]op[178]8):[141]1090:nr[178]nr[171]2:[137]1740
  220. 1767 :
  221. 1768 :[143] quit query
  222. 1769 :
  223. 1770 [151]214,22:[153]:[153]"cont   quit? are you sure? (ycont/ncont)  "
  224. 1771 [151]198,0
  225. 1772 [161]a$:[139]a$[178]""[167]1772
  226. 1774 [139]a$[178]"y"[167]40000
  227. 1775 [137]1720
  228. 1787 :
  229. 1788 :[143] play hand - deal new one
  230. 1789 :
  231. 1790 [129]i[178]5[164]9:c(i)[178]0:[141]960:[130]:[141]1160:[139]gg[178]1[167]1820
  232. 1800 [137]1740
  233. 1817 :
  234. 1818 :[143] endgame
  235. 1819 :
  236. 1820 [153]"load":[151]53272,23
  237. 1822 [158]mt[170]3,0,39,0,24,160,sk
  238. 1824 [158]36864,ww,15,11,12
  239. 1826 [151]214,22:[153]:[153]"cont                                        ";
  240. 1828 [129]i[178]217[164]242:[151]i,[194](i)[176]128:[130]
  241. 1830 [153]"oncont(NULL) - (NULL)ave   len - lenlear   atnny keywait"
  242. 1832 [151]198,0
  243. 1840 [161]a$:[139]a$[178]""[167]1840
  244. 1842 [139]a$[179][177]"s"[167]1850
  245. 1844 [159]15,dv,15,"s0:slide scores":[160]15
  246. 1846 [158]36870,"slide scores"
  247. 1848 [158]36864,0,15,11,12:[137]1860
  248. 1850 [139]a$[178]"c"[167]ww[178]0:[158]36873:[137]1844
  249. 1860 [151]199,0:[151]53272,31:[137]1670
  250. 1880 [158]mt[170]6,208
  251. 1887 :
  252. 1888 :[143] rules screens
  253. 1889 :
  254. 1900 [153]"loadcont":[158]mt[170]3,0,39,0,24,160,sk
  255. 1920 [153][163]9)"s l i d e   p o k e r"
  256. 1922 [153]"   try to get the best poker hand you
  257. 1924 print"can in the middle row by sliding the
  258. 1926 [153]"cards diagonally.  press a key from a
  259. 1928 print"through n and the three cards either
  260. 1930 [153]"below it or above it will slide
  261. 1932 print"diagonally.  the last card moved will
  262. 1934 [153]"replace the first one moved.
  263. 1936 print"   pressing g or h will slide the five
  264. 1938 [153]"cards in the middle row horizontally.
  265. 1940 print"   each slide will cost you three
  266. 1942 [153]"points.
  267. 1944 print"   press p when you have the hand you
  268. 1946 [153]"want.  when the deck is done (nine
  269. 1948 print"hands), if your score is high enough
  270. 1950 [153]"you will make the hall of fame.
  271. 1952 print"   press o to take back your last move.
  272. 1958 [153][163]13)"press a key"
  273. 1960 [151]198,0
  274. 1970 [161]a$:[139]a$[178]""[167]1970
  275. 1972 [158]mt[170]3,0,39,0,24,160,sk
  276. 1980 [153]"contthe values of poker hands"
  277. 1990 [129]i[178]0[164]10:[153][163]10)""ms$(i):[130]
  278. 1992 [151]214,22:[153]:[153][163]14)"press a key"
  279. 2000 [151]198,0
  280. 2010 [161]a$:[139]a$[178]""[167]2010
  281. 2070 [158]mt[170]9,208:[137]1740
  282. 10000 [159]15,8,15,"s0:slide poker":[160]15:[148]"slide poker",8:[128]
  283. 40000 [153]"load":[151]53281,0:[151]53280,0
  284. 40002 a$[178]"hello connect":[129]i[178]8[164]9:[160]2:[159]2,i,2:[160]2:[139]st[167]40020
  285. 40010 [160]15:[159]15,i,15,"r0:"[170]a$[170]"="[170]a$:[132]15,er:[160]15:[139]er[178]63[167]40030
  286. 40020 [130]:[153]"load":[151]2048,0:[151]44,8:[151]53272,23:[151]186,8:[128]
  287. 40030 [151]646,[194](53281):[153]"loadload"[199](34)a$[199](34)","i
  288. 40040 [153]"run":[151]44,8:[151]2048,0:[151]631,13:[151]632,13:[151]198,2:[128]
  289.